<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/8/24
 * Time: 16:44
 */
namespace app\api\model;

use think\Model;

class BaseModel extends Model {

    // 定义时间戳字段名
    protected $createTime = 'created_at';
    protected $updateTime = 'updated_at';
    protected $autoWriteTimestamp = 'timestamp';

    protected function prefixImgUrl($value,$data){
        if($data['from'] == 1){
            return config('setting.img_prefix').$value;
        }
        return $value;
    }

}